package com.yonyou.cyxdms.sysAuth.service.dto.role;

import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;
import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeDeserializer;
import com.yonyou.cyx.function.utils.jsonserializer.localdatetime.JsonLocalDateTimeSerializer;


/**
 * <p>
 * 角色信息
 * </p>
 *
 * @author 李贺
 * @since 2019-09-18
 */

public class RoleDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 角色id
     */
        private Long roleId;
            private Integer companyId;
        /**
     * 角色代码
     */
        private String roleCode;
        /**
     * 角色名称
     */
        private String roleName;
        /**
     * 数据来源
     */
        private Integer dataSource;
        /**
     * 数据类型
     */
        private Integer dataType;
        /**
     * 逻辑删除标志：是否删除
     */
        private Boolean isDeleted;
    
    public RoleDTO() {
        super();
    }




    public Long getRoleId() {
        return roleId;
    }


    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }



    public Integer getCompanyId() {
        return companyId;
    }


    public void setCompanyId(Integer companyId) {
        this.companyId = companyId;
    }



    public String getRoleCode() {
        return roleCode;
    }


    public void setRoleCode(String roleCode) {
        this.roleCode = roleCode;
    }



    public String getRoleName() {
        return roleName;
    }


    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }



    public Integer getDataSource() {
        return dataSource;
    }


    public void setDataSource(Integer dataSource) {
        this.dataSource = dataSource;
    }



    public Integer getDataType() {
        return dataType;
    }


    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }



    public Boolean getDeleted() {
        return isDeleted;
    }


    public void setDeleted(Boolean isDeleted) {
        this.isDeleted = isDeleted;
    }



    @Override
    public String toString() {
        return "RoleDTO{" +
        "roleId=" + roleId +
        ", companyId=" + companyId +
        ", roleCode=" + roleCode +
        ", roleName=" + roleName +
        ", dataSource=" + dataSource +
        ", dataType=" + dataType +
        ", isDeleted=" + isDeleted +
        "}";
    }
    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param poClass dto 需要转换的dto
     * @author 李贺
     * @since 2018/7/22 0022
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     * @param po 需要转换的对象
     * @author 李贺
     * @since 2018/7/22 0022
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "roleId");
    }

}
